package cc.wanforme.chipmunity.system.po;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import cc.wanforme.chipmunity.common.consts.PassageEnum;

/**
 * @author wanne
 * 2019年8月15日
 * 
 */
public class Passage implements Serializable{
	
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.AUTO)
	private Long id;
	
	private Long subjectId;
	
	private String title;
	
	private Long authorId;
	// 表示发表文章时用的名称
	private String author;
	
//	private String rtfFile;
	
	private String rtfContent;
	
	private Integer replyNum;
	
	private Date publishTime;
	
	private String state;
	
	private Date lastUpdate;

//	private Integer viewTimes;
	
	public Passage() {}
	
	public Passage(Long subjectId, String title, Long authorId, String author, String rtfContent) {
		super();
		this.subjectId = subjectId;
		this.title = title;
		this.authorId = authorId;
		this.author = author;
		this.rtfContent = rtfContent;
		
		this.replyNum = 0;
		Date now = new Date();
		this.publishTime = now;
		this.state = PassageEnum.STATE_ON.getState();
		this.lastUpdate = now;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getSubjectId() {
		return subjectId;
	}

	public void setSubjectId(Long subjectId) {
		this.subjectId = subjectId;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Long getAuthorId() {
		return authorId;
	}

	public void setAuthorId(Long authorId) {
		this.authorId = authorId;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getRtfContent() {
		return rtfContent;
	}

	public void setRtfContent(String rtfContent) {
		this.rtfContent = rtfContent;
	}

	public Integer getReplyNum() {
		return replyNum;
	}

	public void setReplyNum(Integer replyNum) {
		this.replyNum = replyNum;
	}

	public Date getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}
	
//	public Integer getViewTimes() {
//		return viewTimes;
//	}
//	
//	public void setViewTimes(Integer viewTimes) {
//		this.viewTimes = viewTimes;
//	}
}
